† Corresponding author. E-mail:
Based on the Fisher–Yatess scrambling and DNA coding technology, a chaotical image encryption method is proposed. First, the SHA-3 algorithm is used to calculate the hash value of the initial password, which is used as the initial value of the chaotic system. Second, the chaotic sequence and Fisher–Yatess scrambling are used to scramble the plaintext, and a sorting scrambling algorithm is used for secondary scrambling. Then, the chaotic sequence and DNA coding rules are used to change the plaintext pixel values, which makes the ciphertext more random and resistant to attacks, and thus ensures that the encrypted ciphertext is more secure. Finally, we add plaintext statistics for pixel-level diffusion to ensure plaintext sensitivity. The experimental results and security analysis show that the new algorithm has a good encryption effect and speed, and can also resist common attacks.
With the rapid development of computer technology and internet technology, multimedia information transmission becomes increasingly frequent and necessary. However, the openness and sharing of network environment is a huge threat to the security of image transmission. Information encryption technology is necessary to ensure information security. For image encryption, due to its high redundancy, large data capacity, and strong correlation between information, the requirements for image encryption algorithms are more stringent.[1–3] And the traditional encryption methods, such as DES, AES, and RSA,[4,5] can no longer meet the current image encryption requirements. However, these methods are too time consuming. For real-time image encryption, only fast and secure encryption algorithms are available. In recent years, scholars have proposed some new image encryption algorithms, of which the encryption scheme based on chaos theory should be the most prominent.[6–9] Chaotic systems have good pseudo-random characteristics, and some properties such as sensitivity to initial values and unpredictability of orbits are consistent with cryptographic requirements. Chaotic cryptography has been received wide attention and has been applied to image encryption.[10–12] The method proposed in this paper is also based on chaos theory.
To improve the efficiency of encryption, in this paper a low-dimensional chaotic system and is used and it combines with other methods to solve the problems in some existing methods.
Image encryption algorithms are generally classified as scrambling, replacement, and diffusion. The scrambling process changes the position of the pixel, the replacement process changes the value of the pixel, and the diffusion process spreads the image portion information to the full text range. Many scholars have proposed excellent scrambling algorithms, such as Arnold transform, Baker transform, geometric transform, E-curve transform, etc.[13–15] These classical methods have greatly promoted the research in the field of image encryption, but some problems have been exposed in later research. For example, the Arnold transform and the Baker transform have obvious periodicity, and some methods have problems such as poor global scrambling.[16–18] The Fisher–Yatess scrambling method used in this paper is a shuffling algorithm. The advantage is that it does not have any regularity in completely random sorting. Compared with the similar methods used in scrambling, like Arnold transformation which has a finite period, this method is safe. We have not seen anyone use this method for scrambling in similar algorithms, so we use it in this article. Comparing with the original method, we utilize a chaotic sequence instead of a completely random sequence. Chaotic sequences are pseudo-random. That makes the process reversible.
Scientists have found that the sequence of nucleic acids has a natural quaternary combination, similar to the binary system formed by the semiconductorʼs on and off. The huge parallelism, ultrahigh storage density and ultra-low energy consumption of DNA are being developed for molecular computing, data storage, cryptography and other fields, which may eventually lead to the birth of new computers, new data storage and new cryptography systems, triggering a new information revolution.[19–22] In 1999, Gehani et al. proposed a one-time pad (OTP) mechanism based on DNA and presented two kinds of OTP cryptography schemes of the substitution method and the exclusive OR (xor) method.[23] In 2003, Chen et al. constructed a cryptosystem based on DNA molecular sequences.[24] In 2005, Kazuo et al. used DNA to solve the problem of key distribution.[25] In 2009, Mousa et al. designed an information hiding scheme by using a contrast mapping method to embed ciphertext information into any part of nucleic acid sequence without changing the function of nucleic acid.[26] In recent years, DNA coding methods have been continuously developed, and the forms of use have become diverse.[27] In this paper, we use the chaotic sequence to encode and decode DNA sequence and perform DNA-level diffusion. Due to the nature of DNA coding, the entire replacement process takes a short time and the encryption effect is good.
The target of this paper is to propose a safe and efficient image encryption algorithm. Safety is the lower limit and efficiency is the target. The Fisher–Yatess method is used in scrambling. One scramble can achieve the desired effect. We use a simplified DNA coding to replace the plaintext, and also use a low-dimensional Logistic map. All of this gives us a great advantage in terms of encryption speed. The rest of this paper is organized as follows. The relevant methods are given in Section
The Fisher–Yatess random scrambling algorithm is also referred to as the Knuth algorithm, which is a classic shuffle algorithm. The essence of the algorithm is to generate a finite set of random arrangements. This algorithm is unbiased with a total of n! possibilities, and each permutation is of equal probability. This algorithm is very efficient, time complexity is O(n), and no extra storage is required. The algorithm is described as follows.
For sequence A[n], perform the following steps:
(i) let i = n;
(ii) generate a random integer j of 1 to i;
(iii) exchange Ai, Aj values and let
(iv) repeat steps (ii) and (iii) until i = 1.
In this article we take one-dimensional chaotic system logistic map for example. One-dimensional logistic map is a very simple chaotic map in terms of mathematical form. It has an extremely complex dynamic behavior and has a wide range of applications in the field of secure communication. Logistic map is calculated as follows:
Deoxyribonucleic acid is a molecular structure composed of four nucleotides. Adenine (A), thymine (T), cytosine (C), and Guanine (G) form the major part of nucleotide. According to the pairing rule of DNA, A and T are paired and C and G are paired. According to the DNA pairing rule rules, there are eight legal combinations, which are shown in Table
In the process of encrypting the image, the gray value of each 8-bit pixel can be represented by four encoded DNA sequences. For example, a pixel with a grayscale value of 201 and a binary sequence of 11001001 is encoded according to the DNA rules. We can obtain 8 combinations: TACG, TAGC, ATCG, ATGC, CGTA, CGAT, GCTA, and GCAT. In addition, the algorithm also performs different operations on DNA sequences to encrypt images. The DNA addition, subtraction, and xor operations are listed in Tables
The encryption algorithm presented in this paper consists of three parts: scrambling, DNA coding and diffusion. For an image P of size M × N, where M is the number of rows and N is the number of columns, the encryption process is described in detail below.
Due to the irreversibility and collision resistance of the Hash algorithm, it can effectively defend against known plaintext attacks and select plaintext/ciphertext attacks. In this paper used is the SHA-3 algorithm to generate key and system initial value.[28] Users can input passwords with an uncertain size. The original password is SHA-3 to generate a set of 256-bit hash values K as key. A low-dimensional chaotic systems has the characteristics of high efficiency and high efficiency, and its chaos does not lose in a high-dimensional chaotic system. Therefore, the chaotic sequences in this paper are all generated by using a one-dimensional logistic map. In this paper, the chaotic sequence is used four times. Therefore, four groups of initial values are generated by the key. The odd-numbered and even-numbered sequences of Kare separated into 128-bit-length sequences K1 and K2. Then K1 and K2 are divided into bytes, which can be expressed as
Scrambling is divided into two parts. First, the preliminary scrambling is performed through the Fisher–Yatess scrambling algorithm. Image P is converted into a one-dimensional sequence
i) let
ii)
iii) exchange pi and pj values.
After these steps, a preliminary scrambling sequence
Although the scrambled image hides the position information of the pixel, attack methods such as statistical analysis can still obtain a lot of valid information in the plaintext. Therefore, it is necessary to change the pixel value to hide the plaintext information. Used in this paper is the DNA coding and diffusion with chaotic disturbances to solve this problem. The DNA replacement method used in this paper is divided into three steps. First, the original image is encoded by DNA. Then the DNA sequence after being encoded is used for computing the DNA. Finally, the decoded DNA sequence is decoded to complete the replacement process. The specific method is as follows.
Taking x3 and u3 into the logistic map, then generating two chaotic sequence A3 and A4 of length M × N, the codec rule sequence Re and Rd are generated as follows:
A line-by-line operation is operated on C to obtain
To further hide the textual information, the pixel values are diffused after DNA replacement. Take x4 and u4 into the logistic map, then a chaotic sequence A5 of length M × N will be generated. And diffusion takes place according to the following formula:
We use P3 as the original image of the second round of encryption. Bring x5, x6, x7, x8 and u5, u6, u7, u8 serving as parameters into the algorithm to repeat the above process. Here we use the same λ. The result P4 of second round of encryption is the result of the entire encryption process. At this point, encryption ends. The encryption process is shown in Fig.
Decryption is similar to encryption, and it is the reverse of the above steps. First, we calculate
(I) let i = 1, repeat steps (II) and (III) and after each time i=i+1 until i=M×N;
(II)
(III) exchange pi and pj values.
We chose Lena and Fabio both with a size of 256 × 256, and pepper to encrypt. Figure
This article uses Matlab 2014 to perform the encryption and decryption program, the computer configuration is 2 GHZ CPU with 4 GB memory and Microsoft Windows 8 operating system. The average time for encrypting a 256 × 256 pixel grayscale image is 1.15 seconds. When encrypting an image with size M × N, it generates chaotic sequences for a total of 5×MN+200 operations, scrambling operations for a total of 6×MN operations, a DNA replacement operation for a total of 12×MN operations, and a conversion with two further conversions. The diffusion operations will total 2×MN operations. A total of 25×MN operations have an algorithm complexity of O(MN).
The histogram of ciphertext image is an important feature, showing whether the algorithm can stand the statistical analysis. Histogram describes the distribution of pixel values of an image. If the distribution is uneven, an attacker can obtain a certain amount of information through statistical analysis. This makes chosen-ciphertext attack easy by analyzing the statistical characteristics of ciphertext images. Therefore, it is necessary to make the distribution of histogram even in a good cryptography. Figure
There is a high correlation between adjacent pixels in plaintext images, which is vulnerable to statistical attack. Therefore, it is necessary to reduce the correlation between adjacent pixels. We utilize Eqs. (
Information entropy reflects the randomness of information, and its value can be calculated by Eq. (
For the algorithm in this paper, when the plaintext changes, λ will change even when the Key is the same and the ciphertext will be completely different. So it is difficult to choose a plaintext attack on this encryption system. The two important features of differential attack are the number of pixels change rate (NPCR) and unified average changing intensity (UACI). Their values can be calculated from Eqs. (
In general, the values of NPCR and UACI must approach to 99.6093% and 33.4635% respectively. As seen in Table
Robustness is an important feature to test the capacity of resisting disturbance of a cryptography.[37] We utilize noise attack and occlusion attack to test the robustness of our proposed algorithm.
In the process of actual communication, one of the most important problems is noise interference. The error propagation phenomenon implies that errors in the encryption image will lead to errors in the decryption image. The common noise types are Gauss noise, salt and Pepper noise, etc. We add Gaussian noise with different variances and salt and Pepper noise with different intensities to the plaintext images, and utilize the same key to encrypt and decrypt. Figure
Occlusion attack is another kind of robustness test, and we decrypt the images which are the encryption images with 1/8, 1/4, and 1/2 occlusion. The quality of decryption images decreases as the occlusion size increases. Figure
We proposed a new chaotic image encryption algorithm based on Fisher–Yatess scrambling and DNA coding in this paper. The algorithm includes the following three major improvements. The Fisher–Yatess method that we use in the scrambling process is efficient and safe. It solves the shortcomings of some traditional methods which are periodic. The methods such as Arnold transform and Baker transform are periodic. We then simplify the DNA method. It becomes more efficient, which is what we are pursuing. Finally, we add plaintext statistics for pixel-level diffusion. This makes our algorithm perform better against plaintext attacks. The algorithm uses high-efficiency low-dimensional chaos, thus avoiding the generation of long chaotic sequences. Our experimental results demonstrate that the algorithm can resist common attacks, and has an advantage in encryption time over the existing methods.
1 | |
2 | |
3 | |
4 | |
5 | |
6 | |
7 | |
8 | |
9 | |
10 | |
11 | |
12 | |
13 | |
14 | |
15 | |
16 | |
17 | |
18 | |
19 | |
20 | |
21 | |
22 | |
23 | |
24 | |
25 | |
26 | |
27 | |
28 | |
29 | |
30 | |
31 | |
32 | |
33 | |
34 | |
35 | |
36 | |
37 |